import request from '@/utils/request'
export const getChannelList = () => {
  return request({
    method: 'get',
    url: '/v1_0/user/channels'
  })
}
/**
 * 获取所有频道的列表
 * @returns
 */
export const getAllChannelList = () => {
  return request({
    method: 'get',
    url: '/v1_0/channels'
  })
}

/**
 * 同步增加服务器频道
 * @param {*} channels
 * @param {*} id
 * @param {*} seq
 * @returns
 */
export function reqAddChannel(channels) {
  return request({
    method: 'PATCH',
    url: '/v1_0/user/channels',
    data: {
      channels

    }
  })
}
/**
 * 删除频道
 * @param {*} id
 * @returns
 */
export function reqDelChannel(id) {
  return request({
    method: 'DELETE',
    url: `/v1_0/user/channels/${id}`

  })
}
